import HTTP from '../../axios/http';

export default function register (params) {
  return function (dispatch) {
    return HTTP.post("/user/register", params).then(res => {
      if (res.data.code === 0) {
        // dispatch({
        //   type: "LOGIN",
        //   user: params.username
        // });
      }
      return res.data;
    })
  }
}